package com.thesis.downloader;

public class downloaderBusRoute {
	public final static int MAX_NO_BUSSTOP = 100;
	int mBusRouteID;
	
	int[] mBusStopList = new int[MAX_NO_BUSSTOP];
	
	public downloaderBusRoute(int ID, boolean luotdi)
	{
		mBusRouteID = (luotdi) ? mBusRouteID : -mBusRouteID; 
		for (int i = 0; i < MAX_NO_BUSSTOP; i++) {
			mBusStopList[i]=0;
		}
	}
	
	
	public void addBusStop(int busStopOrder, int busStopID) throws Exception
	{
		if (busStopOrder>MAX_NO_BUSSTOP)
			throw new Exception("Please check busstop order");
		mBusStopList[busStopOrder] = busStopID;
	}
	
	public String getInfo()
	{
		String result = mBusRouteID + "\n";
		for (int i = 0; i < MAX_NO_BUSSTOP; i++) {
			if (mBusStopList[i]==0)
				break;
			result += mBusStopList[i] + " ";
		}
		return result;
	}

}
